#!/bin/sh

if [ $# -gt 0 -a -d ../branches/$1 ]
then
	cd ../branches/$1
	
	echo "Cleaning up files..."
	for po in *.po; do
		msgattrib -o $po.no-o --no-wrap --no-obsolete $po
		mv $po.no-o $po
	done
	echo "Done."
else
	echo "The branch '$1' does not exist. A valid branch must be specified."
	echo "Usage: ./cleanup.sh [BRANCH]."
fi
